class CreateProducts < ActiveRecord::Migration[5.1]
  def change
    create_table :products, comment: '商品' do |t|
      t.string :name, comment: '名称'
      t.integer :category_id, comment: '分类id'
      t.jsonb :param_keys, comment: '参数键名'
      t.jsonb :param_values, comment: '参数值'
      t.float :price, comment: '价格'
      t.string :des, comment: '描述'
      t.integer :sale_count, comment: '销量'
      t.integer :rest_count, comment: '库存'

      t.timestamps
    end
  end
end
